<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>

<div id="accordion">
	<!-- FORMULARIO REGISTRO -->
	<div><a href="#">Datos Personales</a></div>
	<div>
		<html:form action="usuario.do"  method="post" styleClass="hform" styleId="formRegistro">
			<ul>
				<li>
					<label>Usuario:</label>
					<html:text styleId="usrNick"  styleClass="ui-widget-header" property="usrNick" value="${usuario.usrNick}"/>
				 	<script type="text/javascript">
	 					var f1 = new LiveValidation('usrNick', { validMessage: " ", wait: 5 });
	  					f1.add(Validate.Presence, { failureMessage: "Campo obligatorio." } );
	  					f1.add( Validate.Length, {minimum: 3, maximum:10 } );
	  					f1.add( Validate.Exclusion, { within: [ ' ' ], partialMatch: true } );
					</script>
				</li>							
				<li>
					<label>Contrase&ntilde;a:</label> 
					<html:password styleId="usrPassword" styleClass="ui-widget-header" property="usrPassword" value="${usuario.usrPassword}"/>
					<script type="text/javascript">
	 					var f1 = new LiveValidation('usrPassword', { validMessage: " ", wait: 5 });
	  					f1.add(Validate.Presence, { failureMessage: "Campo obligatorio." } );
	  					f1.add( Validate.Length, {minimum: 3, maximum:30 } );
					</script>
				</li>							
				<li>
					<label>Confirmaci&oacute;n:</label> 
					<html:password styleId="usrPasswordConfirma" styleClass="ui-widget-header" property="usrPasswordConfirma" value="${usuario.usrPassword}"/>
					<script type="text/javascript">
	 					var f1 = new LiveValidation('usrPasswordConfirma', { validMessage: " ", wait: 5 });
	  					f1.add(Validate.Presence,{ failureMessage: "Campo obligatorio." } );
						f1.add(Validate.Confirmation, {match : 'usrPassword'});
					</script>
				</li>
							
				<li>
					<label>Tipo:</label> 
					<html:select property="usrTipo" styleId="usrTipo" styleClass="ui-widget-header" size="1" value="${usuario.usrTipo}">
						<html:option value="">Selecciona...</html:option>
        				<html:option value="administrador">Administrador</html:option>
        				<html:option value="supervisor">Supervisor</html:option>
						<html:option value="usuario">Usuario</html:option>
					</html:select>
					<script type="text/javascript">
						var var1 = new LiveValidation('usrTipo', { validMessage: " ", wait: 5 });
						var1.add(Validate.Exclusion, { within: ['Selecciona...'], failureMessage: "Selecciona una opcion"});
					</script>
				</li>						
			</ul>
			<p>
			<html:hidden styleId="usrId" property="usrId" value="${usuario.usrId}"/>
			<html:hidden styleId="usrPlantilla" property="usrPlantilla" value="${usuario.usrPlantilla}"/>
			<html:hidden styleId="parent" property="parent" value="Usuarios"/>
				<button name="accion" value="cambioUsuario" class="ui-state-active ui-corner-all">
					<span style="vertical-align:middle;"><img src="images/guardar.png" height="24" ></span>
					<span style="vertical-align:middle; padding: 0 0 13px;">&nbsp;Guardar&nbsp;</span>					
				</button>
			</p>
		</html:form>
	</div>				
</div>

